<template>
  <div class="box"   @click="
      $router.push({
        path: '/detail',
        query: {
          id: item.productId,
        },
      })
    ">
    <img class='img' :src="item.imageUrl" alt=""/>
    <div class="message">
      <div class="msgItem price">￥ <span>{{item.productPrice}}</span> </div>
      <div class="specialmsg">
        <div class="msgleft">{{item.productName}}</div>
        <div class="msgright">分销：<span class="num">{{item.productYardNumber}}</span></div>
      </div>
      <div class="msgItem num">{{ item.storeName }}</div>
    </div>
  </div>
</template>

<script>

export default {
  props: ['item'],
  data () {
    return {

    }
  },
  created () {
  },
  methods: {

  }
}
</script>

<style scoped lang="scss">
.box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  .img{
    width: 2.5rem;
    // height: 3rem;
  }
  .message{
    // width: 2.2rem;
    flex: 1;
    margin: 0.1rem 0rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    .msgItem{
      width: 1.96rem;
      // padding: 0 0.12rem;
      height: 0.24rem;
      line-height: 0.24rem;
      text-align: left;
      color: #666666;
      font-size: 0.12rem;
    }
    .num{
          color: #EC6C15;
        }
    .price{
      font-size: 0.16rem;
      color: #E22A1F;
      span{
        font-weight: 800;
        margin-left: -5px;

      }
    }
    .specialmsg{
      width: 1.96rem;
      height: 0.24rem;
      line-height: 0.24rem;
      padding: 0 0.12rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .msgleft{
        width: 1.45rem;
        font-size: 0.12rem;
        color: #666666;
        text-overflow: ellipsis;
        overflow: hidden;
        word-break: break-all;
        white-space: nowrap;
      }
      .msgright{
        width: 0.7rem;
        white-space: nowrap;
        font-size: 0.12rem;
        color: #666666;
        .num{
          color: #EC6C15;
        }
      }
    }
  }
}
</style>
<style scoped lang="scss">
@media screen and (max-width: 1300px) {

.box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  .img{
    width: 2.2rem;
    // height: 3rem;
  }
  .message{
    width: 2.2rem;
    flex: 1;
    margin: 0.1rem 0rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    .msgItem{
      width: 1.96rem;
      padding: 0 0.12rem;
      height: 0.24rem;
      line-height: 0.24rem;
      text-align: left;
      color: #666666;
      font-size: 0.12rem;
    }
    .price{
      font-size: 0.16rem;
      color: #E22A1F;
    }
    .specialmsg{
      width: 1.96rem;
      height: 0.24rem;
      line-height: 0.24rem;
      padding: 0 0.12rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .msgleft{
        width: 1.45rem;
        font-size: 0.12rem;
        color: #666666;
        text-overflow: ellipsis;
        overflow: hidden;
        word-break: break-all;
        white-space: nowrap;
      }
      .msgright{
        width: 0.7rem;
        white-space: nowrap;
        font-size: 0.12rem;
        color: #666666;
        .num{
          color: #EC6C15;
        }
      }
    }
  }
}
}
</style>
